<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>购物车</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            font-family: 宋体;
        }
        html, body{
            width: 100%;
            height: 100%;
        }
        #app{
            width: 375px;
            height: 100%;
            background-color: whitesmoke;
            display: flex;
            flex-direction: column;
            margin: 0 auto;
        }
        .color-white{
            color: #FFFDF0;
        }
        .fw-500{
            font-weight: 500;
        }
        .fw-600{
            font-weight: 600;
        }
        .fs-20{
            font-size: 20px;
        }
        .fs-16{
            font-size: 16px;
        }
        .fs-14{
            font-size: 14px;
        }
        .fs-12{
            font-size: 12px;
        }
        .bgc-FF7F00{
            background-color: #FF7F00;
        }
        .mr-15{
            margin-right: 15px;
        }
        .ml-15{
            margin-left: 15px;
        }
        .mt-15{
            margin-top: 15px;
        }
        /*头部*/
        .cart-header{
            height: 70px;
        }
        .cart-header-mobile-info{
            height: 25px;
            display: flex;
            flex-direction: row;
            padding-top: 10px;
        }
        .cart-header-mobile-info > span{
            margin-left: 35px;
            flex:1;
        }
        .cart-header-mobile-info > div{
            text-align: right;
            padding-right: 10px;
            flex:1;
        }
        .img-size{
            width: 15px;
            height: 15px;
        }
        .cart-header-title{
            height: 35px;
            display: flex;
        }
        .cart-header-title-left{
            height: 20px;
            display: flex;
            flex: 1;
            justify-content: flex-start;
        }
        .cart-header-title-right{
            height: 20px;
            display: flex;
            flex: 1;
            justify-content: flex-end;
        }
        .cart-detail{
            position: relative;
            flex: 1;
            width: 100%;
            max-height: 100%;
            background-color: #F4F4F4;
        }
        .cart-detail-fixed{
            position: fixed;
            top: 70px;
            width: 360px;
            height: 90px;
            margin: 0;
            padding-left: 15px;
            padding-top: 10px;
        }
        .cart-bottom{
            position: fixed;
            bottom: 0px;
            width: 375px;
            height: 50px;
            background-color: #FF7F00;
        }
    </style>
    <script src="../0508.js"></script>
</head>
<body>
    <div id="app">
        <cart-header></cart-header>
        <cart-detail></cart-detail>
        <cart-bottom></cart-bottom>
    </div>
</body>
<script src="../vue.js"></script>
<script>
    let app = new Vue({
        el: "#app",
        data: {
            list: []
        },
        mounted(){
            setTimeout(() => {
                this.list = [
                    {
                        id: "10001",
                        name: "华为9X",
                        price: 1299
                    },
                    {
                        id: "10002",
                        name: "毛巾",
                        price: 6.92
                    },
                    {
                        id: "10003",
                        name: "中华牙膏",
                        price: 9.23
                    },
                    {
                        id: "10004",
                        name: "奥克斯空调",
                        price: "2299"
                    }
                ];
            }, 3000);
        },
        components: {
            "cart-header": {
                data(){
                    return {}
                },
                template: `
                    <div class="cart-header bgc-FF7F00">
                        <div class="cart-header-mobile-info">
                            <span class="fw-500 color-white fs-16">19:15</span>
                            <div>
                                <img class="img-size" src="icon/xinhao.png" alt="">
                                <img class="img-size" src="icon/WIFI.png" alt="">
                                <img class="img-size" src="icon/dianchi.png" alt="">
                            </div>
                        </div>
                        <div class="cart-header-title">
                            <span class="ml-15 color-white fs-20 fw-600 cart-header-title-left mt-15">
                                购物车
                            </span>
                            <span class="mr-15 color-white fs-14 cart-header-title-right mt-15">
                                管理
                            </span>
                        </div>
                    </div>
                `,
            },
            "cart-detail": {
                data(){
                    return {}
                },
                template: `
                    <div class="cart-detail">
                        <div class="cart-detail-fixed bgc-FF7F00">
                            <span class="color-white fs-12">共24件宝贝</span>
                        </div>
                    </div>
                `,
            },
            "cart-bottom": {
                data(){
                    return {}
                },
                template: `
                    <div class="cart-bottom">

                    </div>
                `,
            },

        }
    });
</script>
</html>